package com.POJO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Package com.POJO
 * @Date 2024-05-23 11:02
 * 用户类,储存老师和学生的用户信息
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    private int userId;
    private String password;
    private String username;
    private String role;

    //重写toString方法，用于输出用户对象的信息
    @Override
    public String toString() {
        //返回格式化后的用户信息字符串
        return "User{" +
                "id=" + userId +
                ", password='" + password + '\'' +
                ", username='" + username + '\'' +
                ", role='" + role + '\'' +
                '}';
    }
}